package com.qsxc.dao.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Builder;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 *
 * </p>
 *
 * @author
 * @since 2022-02-18
 */
@Data
@Builder
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value = "SmCheckcode对象", description = "")
public class SmCheckcode extends Model<SmCheckcode> {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @TableField(value = "created_by", fill = FieldFill.INSERT)
    private Long createdBy;

    @TableField(value = "created_date", fill = FieldFill.INSERT)
    private Date createdDate;

    @TableField(value = "last_updated_by", fill = FieldFill.UPDATE)
    private Long lastUpdatedBy;

    @TableField(value = "last_updated_date", fill = FieldFill.UPDATE)
    private Date lastUpdatedDate;

    @TableField("phone_no")
    private String phoneNo;

    @TableField("check_code")
    private String checkCode;

    @ApiModelProperty(value = "1、短信  2、图片")
    @TableField("type")
    private String type;

    @TableField("lost_time")
    private Date lostTime;

    @TableField("user_id")
    private Long userId;

    @TableField("call_ip")
    private String callIp;

    @TableField("is_use")
    private String isUse;

    public static final String ID = "id";

    public static final String CREATED_BY = "created_by";

    public static final String CREATED_DATE = "created_date";

    public static final String LAST_UPDATED_BY = "last_updated_by";

    public static final String LAST_UPDATED_DATE = "last_updated_date";

    public static final String PHONE_NO = "phone_no";

    public static final String CHECK_CODE = "check_code";

    public static final String TYPE = "type";

    public static final String LOST_TIME = "lost_time";

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}
